<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.prime.com.tr/ui"
	xmlns:t="http://java.sun.com/jsf/composite/tags">






<p:tabView>

	<p:tab title="#{msgs['scheduleDetailsView.taskDetailsTab']}">
		<h:panelGrid columns="3">


		</h:panelGrid> 
	</p:tab>

	<p:tab title="#{msgs['scheduleDetailsView.addTaskTab']}">
		<p:messages autoUpdate="true"></p:messages>
		<h:panelGrid columns="3" >
			
		
			<h:outputLabel for="project" value="#{msgs['newTaskMainView.projectName']}" />
		   <p:selectOneMenu id="project" value="#{newTaskViewBean.project}"
					label="#{msgs['newProjectMainView.projectName']}">
					  <f:selectItems value="#{newTaskViewBean.projects}" var="project" itemLabel="#{project.name}" itemValue="#{project.id}"/>
			</p:selectOneMenu>
			<p:message id="projectMsg" for="project" display="icon" />

			<h:outputLabel for="parentTask" value="Parent task:" />
		   <p:selectOneMenu id="parentTask" value="#{newTaskViewBean.task}"
					label="Parent task:">
					  <f:selectItems value="#{newTaskViewBean.tasks}" var="task" itemLabel="#{task.name}" itemValue="#{task.id}"/>
			</p:selectOneMenu>
				<p:message id="projectMsgss" for="parentTask" display="icon" />

			<h:outputLabel for="name" value="#{msgs['newTaskMainView.name']}" />
			<p:inputText id="name" value="#{newTaskViewBean.name}" size="9"  label="#{msgs['newTaskMainView.name']}">
				<p:ajax event="blur" update="nameMsg name" />
			</p:inputText>
			<p:message id="nameMsg" for="name" display="icon" />

			<h:outputLabel for="startDate" value="#{msgs['newTaskMainView.startDate']}" />
			<p:calendar effect="fadeIn" id="startDate" size="9" value="#{newTaskViewBean.startDate}" />
			<p:message id="startDateMsg" for="startDate" display="icon" />

			<h:outputLabel for="endDate" value="#{msgs['newTaskMainView.endDate']}" />
			<p:calendar effect="fadeIn" id="endDate" size="9" value="#{newTaskViewBean.endDate}" />
			<p:message id="endDateMsg" for="endDate" display="icon" />


			<h:outputLabel for="duration" value="#{msgs['newTaskMainView.duration']}" />
			<p:spinner id="duration" value="#{newTaskViewBean.duration}" size="9" min="8" max="1000" />
			<p:message for="duration" display="icon" />

			<h:outputLabel for="estimatedEffort" value="#{msgs['newTaskMainView.estimatedEffort']}" />
			<p:spinner id="estimatedEffort" size="9" value="#{newTaskViewBean.estimatedEffort}" min="0" max="1000" />
			<p:message for="estimatedEffort" display="icon" />

			<h:outputLabel for="percetageComplete" value="#{msgs['newTaskMainView.percetageComplete']}" />

			<p:column>
				<p:slider for="percetageComplete" display="percetageCompleteOutput" style="width:120px;float:left;">

				</p:slider>
				<p:column>
					<h:outputText id="percetageCompleteOutput" value="#{newTaskViewBean.percetageComplete}" style="float:left;" />
				</p:column>
				<p:column>
					<h:outputText value="%" style="float:left;" />
				</p:column>
			</p:column>
			<h:inputHidden id="percetageComplete" value="#{newTaskViewBean.percetageComplete}" />

			<p:commandButton id="createButton" value="#{msgs['newTaskMainView.createTask']}" actionListener="#{newTaskViewBean.createTask}" update="parentTask"/>
																					
		</h:panelGrid>
	</p:tab>



</p:tabView>





</html>